package com.hy.mydesktop.client.component.mvc.factory;

import com.extjs.gxt.ui.client.mvc.Controller;
import com.hy.mydesktop.client.component.mvc.factory.util.ControllerFactoryUtil;
import com.hy.mydesktop.client.mvc.panel.ContentPanelControler;
import com.hy.mydesktop.client.mvc.panel.tab.TabItemControler;
import com.hy.mydesktop.client.mvc.panel.tab.TabPanelControler;
import com.hy.mydesktop.shared.persistence.domain.gxt.GxtComponentControllerMetaNodeModel;

public class TabItemControllerFactory {

	public static Controller createTabItemController(
			GxtComponentControllerMetaNodeModel gxtComponentMetaNodeModel) {
		return configureTabItem(gxtComponentMetaNodeModel);

	}

	private static Controller configureTabItem(
			GxtComponentControllerMetaNodeModel gxtComponentMetaNodeModel) {
	TabItemControler tabItemControler = createDefaultTabItemControler();
		
		return ControllerFactoryUtil.configureWindow(tabItemControler, gxtComponentMetaNodeModel);
		
	}

	private static TabItemControler createDefaultTabItemControler() {
		TabItemControler tabItemControler = new TabItemControler();
		
		return tabItemControler;
	}

}
